

package pacman.skills;


/**
 * This class represents the delay time of skills
 * @author Leonardo
 */
public class Timer {
    private int tick;
    private int millisPerTick;

   
    /**
     * Set the delay time depending on each skill
     * @param tick time unit
     */
    public Timer(int tick){
        this.millisPerTick = 1000;
        this.tick = tick;
    }

        
    /**
     * Delay in exectuion
     */
    public void run()
    {
       while (true) {
            try {
                Thread.sleep(tick*millisPerTick);
                break;
            }
                catch (InterruptedException e) {
            }
        }
    }

}
